export default [
  // user
  {
    path: '/user',
    component: '../layouts/UserLayout',
    routes: [
      { path: '/user', redirect: '/user/login' },
      { path: '/user/login', component: './User/Login' },
      { path: '/user/register', component: './User/Register' },
      { path: '/user/register-result', component: './User/RegisterResult' },
    ],
  },
  // app
  {
    path: '/',
    component: '../layouts/BasicLayout',
    Routes: ['src/pages/Authorized'],
    authority: ['admin', 'user', 'serviceman'],
    routes: [
      // dashboard
      { path: '/', redirect: '/user/login' },
      { path: '/index.html', redirect: '/user/login' },
      {
        path: '/produce',
        name: 'produce',
        icon: 'dashboard',
        component: './HengDing/Produce',
      },
      {
        path: '/hdlog',
        name: 'hdlog',
        icon: 'file-text',
        component: './HengDing/HdLogger',
      },
      {
        path: '/settings',
        name: 'settings',
        authority: ['admin', 'serviceman'],
        icon: 'setting',
        component: './HengDing/HdSettings',
      },
      // {
      //   path: '/tools',
      //   name: 'tools',
      //   authority: ['admin', 'serviceman'],
      //   icon: 'tool',
      //   component: './HengDing/HdTools',
      // },
      {
        path: '/database',
        name: 'database',
        authority: ['admin'],
        icon: 'database',
        component: './HengDing/DatabaseTool',
      },
      {
        path: '/account',
        name: 'account',
        authority: ['admin'],
        icon: 'user',
        component: './HengDing/AccountManager',
      },
      // {
      //   path: '/debug',
      //   name: 'debug',
      //   authority: ['admin'],
      //   hideInMenu: true,
      //   component: './HengDing/Debug',
      // },
      {
        component: '404',
      },
    ],
  },
];
